<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::namespace('user')->group(function (){
    Route::prefix('user')->middleware('UserMiddleware')->group(function (){
        Route::post('add_vip_order','VipsController@add_vip_order');
        Route::get('user_info','UsersController@user_info');
        Route::post('set_auto_point','UsersController@setAutoPoint');
        Route::post('set_point_uid','UsersController@set_point');
        Route::post('update_nickname_headimgurl','UsersController@update_nickname_headimgurl');
        Route::get('get_bills','UsersController@get_bills');//获取账单
        Route::get('users_spread','UsersController@get_users_spread');//获取好友列表
        Route::get('get_child_users','UsersController@get_child_users_point');
        Route::get('user_qrCode','UsersController@userQrCode');
        Route::post('update_user_name','UsersController@update_user_name');



        Route::get('get_projects_one','ProjectsController@get_project_info');
        Route::post('add_project_log','ProjectsController@add_project_log');
        Route::get('get_categorys','ProjectsController@get_categorys');
        Route::post('recive_pass','ProjectsController@recive_pass');
        Route::get('get_project_log','ProjectsController@get_project_log');
        Route::get('get_tasks','TaskController@get_task');
        Route::get('get_task_one','TaskController@get_task_one');
        Route::post('add_task_log','TaskController@add_task_log');
        Route::get('get_task_log','UsersController@get_user_task_log');
        Route::get('get_data_count','UsersController@get_data_count');
        Route::get('get_user_chengyuans','UsersController@get_user_chengyuans');
        Route::post('set_card_json','UsersController@set_card_json');
        Route::post('widthwal','UsersController@widthwal');
    });


    Route::prefix('user')->group(function (){
        Route::any('file_up','UsersController@file_up');
        Route::get('get_user_vips','VipsController@get_vips');//获取vip列表
        Route::post('login','UsersController@login');//用户登陆
        Route::any('notice_vip','NoticeController@notice_vip')->name('notice_vip');//用户登陆
        Route::get('get_projects','ProjectsController@get_projects');
        Route::get('get_images','ImagesController@get_images');
        Route::any('notice_project','NoticeController@notice_project')->name('notice_project');
        Route::any('event','NoticeController@event');
        Route::any('update_user_phone_bind','UsersController@update_user_phone_bind');
        Route::any('test','UsersController@test');


        Route::any('user_spread_task','TaskController@user_spread_task');
        Route::any('gudongFen','TaskController@gudongFen');
    });

});


